dgb(Phase-B): SSOT expected-time-to-block diagnostic + non-circular KAT - #390
Merged
Conversation
Lift the final expected-time-to-block arithmetic (etb_secs = average_attempts / real_pool_hs, with the uint64-overflow 1e18 sentinel) out of node.cpp diagnostics into a header-only SSOT, expected_time_to_block.hpp, mirroring the pool_efficiency.hpp lift. The bits->target->average_attempts conversion stays at the call site on the existing chain SSOTs; this captures only the final combine + sentinel. FENCED: dgb/ only, header-only (<cstdint>), consensus-neutral pure arithmetic. node.cpp NOT yet rewired (the byte-identity delegation that folds real-hashrate + get_stale_counts + this is the follow-on). KAT is non-circular (oracle expression recomputed independently vs the p2pool main.py status loop). 7/7 green. Registered in the dgb test CMakeLists and BOTH build.yml --target allowlist arms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Lifts the final expected-time-to-block arithmetic out of
node.cppdiagnostics into a header-only SSOT,src/impl/dgb/expected_time_to_block.hpp:Same pattern as the merged-track pool_efficiency.hpp lift (#389). The
bits -> target -> average_attemptsconversion stays at the call site on the already-verifiedchain::SSOTs; this captures only the final combine + sentinel.Oracle
p2pool-dgb-scrypt
main.pystatus loop:format_dt(2**256 / target / real_att_s)==average_attempts(target) / real_att_s.Fenced / consensus-neutral
src/impl/dgb/only, header-only (<cstdint>), pure arithmetic — no value semantics changed.node.cppNOT yet rewired. The byte-identity delegation rewiring node.cpp:1712-1778 onto all three SSOTs (real-hashrate + existing get_stale_counts + this) is the consolidated follow-on, kept off the think()-loop region so it stays independent of dgb(Phase-B): SSOT think() Phase-5 best-share punish walk + non-circular KAT #378/dgb: SSOT think() Phase-2 verification-extension walk bounds + non-circular KAT #362.Test
dgb_expected_time_to_block_test— 7/7 green, non-circular (oracle expression recomputed independently). Registered in the dgb test CMakeLists and BOTH build.yml--targetallowlist arms (no #143 NOT_BUILT trap).GPG-signed @ 19f9fb7.